<tagLib name="fanwe" />

<include file="Public:header" />
<load href="__TMPL__Static/Js/dataList.js" />
<script type="text/javascript">
var CONFIRM_ERROR = "{%CONFIRM_ERROR}";
var CONFIRM_DELETE = "{%CONFIRM_DELETE}";

function selectChild()
{
    var value = $("#parent_id").val();
    if(value == "id1") 
        document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='my_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
    else if(value=="id2") 
        document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='ml_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
    else if(value=="id3") 
        document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='ot_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
}
    
</script>
<div class="handle-btns">
	<fanwe:linkBtn text="{%RETURN_LIST}" href="{:Cookie::get('returnUrl')}" />
</div>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/update')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="180">{%ZP_NAME}</th>
		<td><input type="text" class="textinput requireinput" name="zp_name" value="{$vo.zp_name}"size =" 80"/></td>
	</tr>
        <tr>
		<th width="180">{%ZP_PINGPAI}</th>
		<td>
                    <table cellpadding="4" cellspacing="0" border="0" >
                        <tr style="none">
                            <td style="none">
                                <foreach name="q_list" item="tag">                                    
                                    <label><input style="font-size: 16px"  type="radio" name="zp_pingpai" value="{$tag.tag_name}" <if condition='$tag.tag_id eq $pp_id'>checked="checked"</if>/><span span style ="font-size: 16px"> {$tag.tag_name} </span></label>                                                   
                                </foreach>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                如若没有添加的品牌， <a href="{:U(GoodsCategory.'/index')}">点击此处添加</a>
                            </td>
                        </tr>
                        
                    </table>
                    
                </td>
	</tr>
        <tr>
		<th width="180">{%ZP_GONGXIAO}</th>
		<td>
                    <table cellpadding="4" cellspacing="0" border="0" >
                        <tr>
                            <td>
                                <foreach name="g_list" item="tag">
                                   
                                <label><input type="checkbox" name="zp_gongxiao[]" value="{$tag.tag_name}" <range name="tag.tag_id" value="$gx_id" type='in' >checked="checked"</range>/><span style ="font-size: 16px"> {$tag.tag_name} </span></label>
                           
                                    
                                </foreach>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                如若没有相应的功效，<a href="{:U(GoodsCategory.'/index')}">点击此处添加</a>
                            </td>
                        </tr>
                    </table>
                    
                </td>
	</tr>
        <tr>
		<th width="180">{%ZP_BIAOQIAN}</th>
		<td>
                    <select name="parent_id" id="parent_id" onchange="selectChild()">
                        <option value ="id1" <if condition="$bq_cate_id eq 13">selected="selected"</if>>{%ZP_MEIYAN}</option>
                        <option value ="id2" <if condition="$bq_cate_id eq 12">selected="selected"</if>>{%ZP_MEILICZ}</option>
                        <option value ="id3" <if condition="$bq_cate_id eq 11">selected="selected"</if>>{%ZP_OTHERMZ}</option>
                    </select>
                     <select name="zp_biaoqian" id="child_id">
			
			<option value="{$vo.zp_biaoqian}"  selected="selected">{$vo.zp_biaoqian}</option>
			
                    </select>

                </td>
	</tr>
        
        <if condition="$vo['zp_pic']">
	<tr>
		<th>{%ZP_PIC}</th>
		<td id ="fileInput">                 	
                    <div class="img_list">		
                    <img src="{$vo.zp_pic|getImgName=100,100,1,true}" />
                    <div class="blank9"></div>
                    <a href="javascript:void(0);" onclick="del_zppic({$vo.zp_id},this);">{%DELETE}</a>
                    </div>			
		</td>
	</tr>	
        <else />
            <tr>
		<th>{%ZP_PIC}</th>
		<td><input type="file" class="fileinput" name="zp_pic" size="30" /></td>
            </tr>
        
	</if>
        <tr>
		<th width="180">{%ZP_PRICE}</th>
		<td><input type="text" class="textinput requireinput" name="zp_price" size="10" value="{$vo.zp_price}"/></td>
	</tr>
        <tr>
		<th width="180">{%ZP_GUIGE}</th>
		<td><input type="text" class="textinput requireinput" name="zp_guige" size="10" value="{$vo.zp_guige}"/></td>
	</tr>
        <tr>
		<th width="180">{%ZP_JIESHAO}</th>
		<td><textarea name="zp_jieshao" class="textinput areainput" rows="5" >{$vo.zp_jieshao}</textarea></td>
	</tr>
        <tr>
		<th>{%SEO_KEYWORDS}</th>
		<td>
			<textarea name="seo_keywords" class="textinput areainput" rows="3">{$vo.seo_keywords}</textarea>
		</td>
	</tr>
	<tr>
		<th>{%SEO_DESC}</th>
		<td>
			<textarea name="seo_desc" class="textinput areainput" rows="3">{$vo.seo_desc}</textarea>
		</td>
	</tr>
	<tr>
		<th>{%ZP_STATUS}</th>
		<td>
			<label><input type="radio" name="zp_status" value="1" <if condition='$vo.zp_status eq 1'>checked="checked"</if> /><span>{%YES}</span></label>
			<label><input type="radio" name="zp_status" value="0" <if condition='$vo.zp_status eq 0'>checked="checked"</if> /><span>{%NO}</span></label>
		</td>
	</tr>
	
	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="hidden" name="zp_id" value="{$vo.zp_id}" />
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>

<include file="Public:footer" />